#ifndef _MY_OLED_H__
#define _MY_OLED_H__

#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

typedef struct{
  int16_t sleepTick;    //息屏计时 100ms
}MY_OLED_CFG;

typedef struct{
    void (*init)(void);
    void (*sleep)(void);

    void (*loop)(void);
    void (*showIP)(String IP);
    void (*showFilament)(String Filament);
}MY_OLED_OPS;

typedef struct{
    MY_OLED_OPS* ops;
    MY_OLED_CFG* cfg;
}MY_OLED;

extern MY_OLED my_oled;

#endif // !_MY_OLED_H__
